import java.util.Arrays;
import java.util.Scanner;

public class Main {

    //排个序
    //有数组 a
    //存在 p 个位置可以进行交换排序
    //最后使得数组 a 为非降序(升序)
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int m = scanner.nextInt();

        int[] a = new int[n + 1];
        for (int i = 1; i <= n; i++) {
            a[i] = scanner.nextInt();
        }

        int[] p = new int[m + 1];
        for (int i = 1; i <= m; i++) {
            p[i] = scanner.nextInt();
        }

        int[] tmp = new int[m + 1];
        for (int i = 1; i <= m; i++) {
            int posP = p[i];
            tmp[i] = a[posP]; // 按p数组顺序抽取元素到tmp
            a[posP] = -1; // 标记已选中位置
        }
        Arrays.sort(tmp, 1, m + 1); // 对前m个元素升序排序
        int pos = m;
        for (int i = 1; i <= n; i++) {
            if (a[i] == -1) {
                a[i] = tmp[pos--]; // 倒序填充
            }
        }
        boolean valid = true;
        for (int i = 2; i <= n; i++) {
            if (a[i] > a[i - 1]) {
                valid = false;
                break;
            }
        }
        System.out.println(valid ? "YES" : "NO");
    }



}
